#include "processo.h"

Processo::Processo()
{
    connect (this, SIGNAL(readyReadStandardOutput()), this, SLOT(outputAvaiable()));
}

void Processo::outputAvaiable()
{
    QString output(this->readAllStandardOutput());
    output.replace("\n", "");
    emit this->outputMesage(output);
}

void Processo::start()
{
    QProcess::start(this->process_name, this->args, QIODevice::ReadWrite);
}
